#ifndef WIDGET_H
#define WIDGET_H

#include <QAction>
#include <QWidget>
#include "./RunPage/runpage.h"
#include "./TeachPage/teachpage.h"
#include "./DebugPage/debugpage.h"
#include "./ManualPage/manualpage.h"
#include "./SetPage/setpage.h"
#include "./AlarmPage/alarmpage.h"
#include "./SetPage/userset.h"
#include "./SetPage/signalset.h"
#include "./SetPage/safeset.h"
#include "./SetPage/sysset.h"
#include "./SetPage/progset.h"
#include "./SetPage/exfuncset.h"
#include "./ManualPage/stacking.h"
#include "./ManualPage/memorypoint.h"
#include "./ManualPage/stackpara.h"
#include "./ManualPage/stackset.h"
#include "./ManualPage/freeprog.h"
#include "./TeachPage/editteach.h"
#include "./TeachPage/editdialog.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE


enum MainWidget_id{
    Login_id=0,      //权限登录界面ID
    Main_id,     //主界面ID
    SubSet_id,   //子设置界面ID
    Formula_id,  //配方界面ID
    subManual_id, //存储点管理界面ID
};

enum SubSetWidget_id{
    Run_id=0,      //运行界面ID
    Teach_id,     //编程界面ID
    Debug_id,   //调试界面ID
    Manual_id,       //手动界面ID
    Set_id,       //设置界面ID
    Alarm_id,     //报警界面ID
};

enum SubMnlWidget_id{
    Stacking_id=0,      //码垛界面ID
    MemoryPoint_id,      //存储点界面ID
    StackPara_id,        //码垛参数界面ID
    StackSet_id,      //码垛坐标设置界面ID
    FreeProg_id,     //自由编程界面ID
};

class Widget : public QWidget
{
    Q_OBJECT

public:


public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    void init();
    void changeSetPage(const int selSetPage);
    void backSetPage();
    void backTeachPage();
    void stackingPage();
    void memoryPointPage();
    void stackParaPage();
    void stackSetPage();
    void FreeProgPage();
    void backEditTeachPage();
    void backManualPage();
    void backStackingPage();
    void backStackParaPage();
    void showEditTeach(const int DialogID);
    void showEditDialog(const int EidtDialogID);
    void editTeachEnd();
    void editTeachDialogEnd();
    void Auto();
    void Stop();
    void Manual();

private:
    Ui::Widget *ui;

    //主界面下的各子界面
    RunPage *RunPage_ui ;
    TeachPage *TeachPage_ui ;
    DebugPage *DebugPage_ui ;
    ManualPage *ManualPage_ui ;
    SetPage *SetPage_ui ;               //设置子界面、
    AlarmPage *AlarmPage_ui ;
    //设置界面下的各个功能界面
    UserSet *UserSet_ui;
    SignalSet *SignalSet_ui;
    SafeSet *SafeSet_ui;
    SysSet *SysSet_ui;
    ProgSet *ProgSet_ui;
    ExFuncSet *ExFuncSet_ui;
    //手动界面下的其他界面
    Stacking *Stacking_ui;
    MemoryPoint *MemoryPoint_ui;
    StackPara *StackPara_ui;
    StackSet *StackSet_ui;
    FreeProg *FreeProg_ui;

    EditTeach *EditTeach_ui;
    EditDialog *EditDialog_ui;
};
#endif // WIDGET_H
